# base image
FROM jdk1.8

ARG rest
# MAINTAINER
MAINTAINER gcy
# rest是参数在构建的时候传入表示将xxxx.jar复制到该容器中
COPY  $rest /user/local

# change dir to /usr/local
WORKDIR /user/local

# port是参数，表示将该容器的某个端口暴露
EXPOSE $port

# 设置java环境变量
ENV JAVA_HOME=/user/local/jdk1.8.0_171
ENV JRE_HOME=/user/local/jdk1.8.0_171/jre
ENV PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
ENV export JAVA_HOME JRE_HOME PATH CLASSPATH

CMD [ "top" ]